package com.sheeran.aichat.controller.model;

import com.sheeran.aichat.entity.model.Model;
import com.sheeran.aichat.service.model.IModelSearchService;
import com.sheeran.aichat.utils.rest.WrappedResponseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: sheeran
 * @create: 2025/02/20
 */
@Api(tags = "模型")
@RequiredArgsConstructor
@RestController
@WrappedResponseController
@RequestMapping("/model")
public class ModelSearchController {

    private final IModelSearchService modelSearchService;

    @ApiOperation("获取模型列表")
    @GetMapping("/list")
    public List<Model> list() {
        return modelSearchService.listAll();
    }
}
